export default {
	data() {
		return {
			rules: {
				name: [{
					required: true,
					message: '请输入姓名',
					trigger: ['change', 'blur']
				}], // 可以单个或者同时写两个触发验证方式 },
				phone: [{
					required: true,
					message: '请输入手机号',
					trigger: ['change', 'blur']
				}, {
					pattern: /^1[0-9]{10}$/,
					message: '请输入正确的手机号',
					trigger: ['change', 'blur']
				}],
				email: [{
					required: true,
					message: '请输入邮箱',
					trigger: ['change', 'blur']
				}, {
					pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/,
					message: '请输入正确的邮箱',
					trigger: ['change', 'blur']
				}],
				idCard: [{
					required: true,
					message: '请输入身份证号',
					trigger: ['change', 'blur']
				}, {
					pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
					message: '请输入正确的身份证号',
					trigger: ['change', 'blur']
				}],
				password: [{
					required: true,
					message: '请输入密码',
					trigger: ['change', 'blur']
				}, {
					min: 6,
					message: '密码长度不能小于6位',
					trigger: ['change', 'blur']
				}, {
					pattern: /^(?=.*?[0-9])(?=.*?[a-z])[0-9a-z]{6,}$/,
					message: '密码是字母加数字的组合',
					trigger: ['change', 'blur']
				}, {
					pattern: /[~!@#$%^&*()_+`\-={}:";'<>?,.\/]/,
					message: '密码不能有特殊字符',
					trigger: ['change', 'blur']
				}]
			}
		}
	}
}
